package org.come.Jpanel;

import java.awt.Dimension;

import javax.swing.JPanel;

import com.tool.btn.FactionBtn;
import com.tool.btn.FormsOnOffBtn;
import com.updateNew.MyIsif;



/**
 * 帮派主面板 编号:48
 * 
 * @author HGC<br>
 * @time 2020年1月11日 上午10:12:59<br>
 * @class 类名:FactionMainJpanel<br>
 */
public class FactionMainJpanel extends JPanel {

    /**
     * 字段名:btnMenuPandect 帮派总览菜单按钮<br>
     * 字段名:btnMenuMember 帮派成员菜单按钮<br>
     * 字段名:btnMenuWar 帮派战报菜单按钮<br>
     */
    private FactionBtn btnMenuPandect, btnMenuMember, btnMenuWar;

    private FactionCardJpanel factionCardJpanel;

    public FactionMainJpanel() {
        setPreferredSize(new Dimension(662, 475));
        setOpaque(false);
        setLayout(null);
        if("水墨UI".equals(MyIsif.getStyle())) {

            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 48);
            offBtn.setBounds(662 - 37, 10, 25, 25);
            this.add(offBtn);

            getBtnMenuMember();
            getBtnMenuPandect();
            getBtnMenuWar();
            factionCardJpanel = new FactionCardJpanel();
            factionCardJpanel.setBounds(0, 0, 662, 475);
            this.add(factionCardJpanel);
        }else{
            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/hongmu/1/s74.png", 1, 48);
            offBtn.setBounds(637, 1, 25, 25);
            this.add(offBtn);

            getBtnMenuMember();
            getBtnMenuPandect();
            getBtnMenuWar();
            factionCardJpanel = new FactionCardJpanel();
            factionCardJpanel.setBounds(0, 0, 662, 475);
            this.add(factionCardJpanel);
        }
    }

    public FactionBtn getBtnMenuPandect() {
        if (btnMenuPandect == null) {
            if(MyIsif.getStyle().equals("水墨UI")) {
                btnMenuPandect = new FactionBtn("skin/8100226/newbutton/K16.png", 1, 1, this);
                btnMenuPandect.setBounds(56, 23, 95, 33);

            }else{
                btnMenuPandect = new FactionBtn("inkImg/hongmu/2/B270.png", 1, 1, this);
                btnMenuPandect.setBounds(56, 28, 80, 30);
            }
            this.add(btnMenuPandect);
        }
        return btnMenuPandect;
    }

    public void setBtnMenuPandect(FactionBtn btnMenuPandect) {
        this.btnMenuPandect = btnMenuPandect;
    }

    public FactionBtn getBtnMenuMember() {
        if (btnMenuMember == null) {
            if("水墨UI".equals(MyIsif.getStyle())) {
                btnMenuMember = new FactionBtn("skin/8100226/newbutton/K17.png", 1, 2, this);
                btnMenuMember.setBounds(158, 23, 95, 33);

            }else{
                btnMenuMember = new FactionBtn("inkImg/hongmu/2/B267.png", 1, 2, this);
                btnMenuMember.setBounds(136, 28, 80, 30);
            }
            this.add(btnMenuMember);
        }
        return btnMenuMember;
    }

    public void setBtnMenuMember(FactionBtn btnMenuMember) {
        this.btnMenuMember = btnMenuMember;
    }

    public FactionBtn getBtnMenuWar() {
        if (btnMenuWar == null) {
            if("水墨UI".equals(MyIsif.getStyle())) {
                btnMenuWar = new FactionBtn("skin/8100226/newbutton/K19.png", 1, 3, this);
                btnMenuWar.setBounds(260, 23, 95, 33);

            }else{
                btnMenuWar = new FactionBtn("inkImg/hongmu/2/B269.png", 1, 3, this);
                btnMenuWar.setBounds(216, 28, 80, 30);
            }
            this.add(btnMenuWar);
        }
        return btnMenuWar;
    }

    public void setBtnMenuWar(FactionBtn btnMenuWar) {
        this.btnMenuWar = btnMenuWar;
    }

    public FactionCardJpanel getFactionCardJpanel() {
        return factionCardJpanel;
    }

    public void setFactionCardJpanel(FactionCardJpanel factionCardJpanel) {
        this.factionCardJpanel = factionCardJpanel;
    }

}
